Shows a context confirmation dialog for the form

<div class="definition">
    confirm(options)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>options</td>
        <td><b>string|object</b>, text of the message or additional options</td>
    </tr>
    </table>
</div>

Returns <i>object</i>.

This method displays a context confirmation dialog.
<div style="height: 10px"></div>

If you have following form:
<textarea class="javascript">
let form = new w2form({
    name: 'form',
    formURL: '/server/path',
    fields: [
        { field: 'first_name', type: 'text', required: true },
        { field: 'last_name', type: 'text', required: true },
        { field: 'email', type: 'email' }
    ]
});
</textarea>

You can
<textarea class="javascript">
w2ui.form.confirm('Some message.')
    .yes(event => {
        console.log('yes', event)
    })
    .no(event => {
        console.log('no', event)
    })
    .answer(event => {
        console.log(event.answer)
    })
    .then(event => {
        console.log('confirm is ready', event)
    })
</textarea>

Or
<textarea class="javascript">
w2ui.form.confirm({
    width: 400,
    height: 200,
    body: 'Some message'
})
.yes(() => { console.log('yes') })
</textarea>